﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Sistema.WF.Componentes.FormulariosBase;
using Sistema.Dominio;
using Sistema.NFe;

namespace Sistema.WF.View.NFe
{
    public partial class FRM_inutilizarNota : FRM_pai
    {
        public NFeInfo nfeInfo;
        public FRM_inutilizarNota()
        {
            InitializeComponent();
        }

        private void FRM_inutilizarNota_Load(object sender, EventArgs e)
        {
            nfeInfo = new NFeInfo();
            
        }

        private void CMD_enviar_Click(object sender, EventArgs e)
        {
            InutilizarNFe inutilizarNota = new InutilizarNFe();
           
            inutilizarNota.Inutilizar((Int32)NUD_notaInicial.Value, (Int32)NUD_notaFinal.Value, new Util.CertificadoDigital().PesquisarCertificadoDigital(),TXT_justificativa.Text);
           
            this.LimparCampos();
        }

        private void CMD_sair_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();
        }
        private void LimparCampos()
        {
            TXT_justificativa.Clear();
            NUD_notaFinal.ResetText();
            NUD_notaInicial.ResetText();
        }

        
    }
}
